<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class veh_reminder_delete2 extends Page
{
       public $hiddenReminder = null;
       public $hiddenVeh = null;
       function veh_reminder_delete2Create($sender, $params)
       {
       $veh = $_GET['veh'];
       $reminder = $_GET['reminder'];
       $this->hiddenVeh->setValue($veh);
       $this->hiddenReminder->setValue($reminder);

       $result = mysql_query("delete from veh_reminder_tbl where vehicle_id='".$this->hiddenVeh->getValue()."' and reminder_id='".$this->hiddenReminder->getValue()."'")
       or die(mysql_error());
       echo "<script type=text/javascript>
        window.opener.location.href='set_veh_reminder_list.php?veh='+".$veh.";
        window.close();
        </script>";
       //redirect('veh_reminder_list.php?veh='.$this->hiddenVeh->getValue().'&reminder='.$this->hiddenReminder->getValue());


       }

}

global $application;

global $veh_reminder_delete2;

//Creates the form
$veh_reminder_delete2=new veh_reminder_delete2($application);

//Read from resource file
$veh_reminder_delete2->loadResource(__FILE__);

//Shows the form
$veh_reminder_delete2->show();

?>